import { createRouter, createWebHistory } from 'vue-router'
import  type {RouteRecordRaw} from  "vue-router"  //路由ts类型
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect:'/home'
  },
  {
    path:'/home',
    name:'home',
    component: () => import('../view/home.vue')
  },
  {
    path:'/protocol',
    name:'protocol',
    component: () => import('../view/UserProtocol.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),//import.meta.env.BASE_URL
  routes
})

export default router


